﻿using ProtoBuf;

namespace Remoting.Reactive.ProtoBuf
{
    [ProtoContract]
    [ProtoInclude(01, typeof(BinaryExpressionDto))]
    [ProtoInclude(02, typeof(BlockExpressionDto))]
    [ProtoInclude(03, typeof(ConditionalExpressionDto))]
    [ProtoInclude(04, typeof(ConstantExpressionDto))]
    //[ProtoInclude(05, typeof(DebugInfoExpressionDto))]
    [ProtoInclude(06, typeof(DefaultExpressionDto))]
    //[ProtoInclude(07, typeof(DynamicExpressionDto))]
    [ProtoInclude(08, typeof(GotoExpressionDto))]
    [ProtoInclude(09, typeof(IndexExpressionDto))]
    [ProtoInclude(10, typeof(InvocationExpressionDto))]
    [ProtoInclude(11, typeof(LabelExpressionDto))]
    [ProtoInclude(12, typeof(LambdaExpressionDto))]
    [ProtoInclude(13, typeof(ListInitExpressionDto))]
    [ProtoInclude(14, typeof(LoopExpressionDto))]
    [ProtoInclude(15, typeof(MemberExpressionDto))]
    [ProtoInclude(16, typeof(MemberInitExpressionDto))]
    [ProtoInclude(17, typeof(MethodCallExpressionDto))]
    [ProtoInclude(18, typeof(NewArrayExpressionDto))]
    [ProtoInclude(19, typeof(NewExpressionDto))]
    [ProtoInclude(20, typeof(ParameterExpressionDto))]
    [ProtoInclude(21, typeof(RuntimeVariablesExpressionDto))]
    [ProtoInclude(22, typeof(SwitchExpressionDto))]
    [ProtoInclude(23, typeof(TryExpressionDto))]
    [ProtoInclude(24, typeof(TypeBinaryExpressionDto))]
    [ProtoInclude(25, typeof(UnaryExpressionDto))]
    public abstract class ExpressionDto
    {
        [ProtoMember(1)]
        public ExpressionTypeDto NodeType { get; set; }
        [ProtoMember(1)]
        public bool CanReduce { get; set; }
    }
}
